import {INCREMENTCOUNT,DECREMENTCOUNT} from '../constant/countCount'
import store from '../store'
export const incrementAction = (data = 1) => {
    return {
        type:INCREMENTCOUNT,
        data
    }
}   
export const decrementAction = (data = 1) => {
    return {
        type:DECREMENTCOUNT,
        data
    }
}
//异步的action
export const waitIncrementAction = (data)=>{
    return  ()=>{
         setTimeout(() => {
            store.dispatch(
                {
                    type:DECREMENTCOUNT,
                    data
                }
            )
        },2000);
    }
}